/* 
 * File:   Ray.cpp
 * Author: brady
 * 
 * Created on February 1, 2011, 3:01 PM
 */

#include "Ray.h"

Ray::Ray() {
    Direction = Vector3D(0.0, 0.0, 1.0);
    Origin = Vector3D(0.0, 0.0, 0.0);
    RecursionDepth = 20;
}

Ray::Ray(Vector3D origin, Vector3D direction)
{
    Direction = direction;
    Origin = origin;
    RecursionDepth = 20;
}

Ray::~Ray() {
}

void Ray::SetDirection(Vector3D direction){
    Direction = direction;
}
void Ray::SetOrigin(Vector3D origin){
    Origin = origin;
}

Vector3D Ray::Follow(double tval)
{
    return Vector3D(Origin + (Direction * tval));
}